-- background: 22243 from stack: in.4 -- bmap block id: 0 -- flags: 4000 -- background id: 0 -- name: Donor Reports ----- HyperTalk script ----- on openCard put the number of last card of this background into LastCard put the number of first card of this background into FirstCard put LastCard-the number of this card+1 into ThisCard put LastCard-FirstCard+1 into TotalCards set the name of background button ID 13 to "Card" && ThisCard set the name of background button ID 14 to "of" && TotalCards end openCard -- part 4 (button) -- low flags: 00 -- high flags: A000 -- rect: left=264 top=287 right=338 bottom=359 -- title width / last selected line: 0 -- icon id / first selected line: 1007 / 1007 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Print ----- HyperTalk script ----- on mouseUp go to first card of background "Donor Reports" --doMenu "Delete Card" set lockscreen to true doMenu "Print Report..." set lockscreen to true end mouseUp -- part 5 (field) -- low flags: 00 -- high flags: 0007 -- rect: left=42 top=35 right=100 bottom=481 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Name -- part 6 (field) -- low flags: 00 -- high flags: 0007 -- rect: left=41 top=115 right=277 bottom=174 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Date -- part 8 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=54 top=287 right=320 bottom=164 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: -- part 9 (field) -- low flags: 00 -- high flags: 0007 -- rect: left=190 top=115 right=277 bottom=485 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Amount -- part 11 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=463 top=304 right=337 bottom=507 -- title width / last selected line: 0 -- icon id / first selected line: 9761 / 9761 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Return ----- HyperTalk script ----- on mouseUp Global LimitCards2 answer "If you leave this background, these cards will be deleted!"& " Maybe you should first print or write this information to a text file?" with "Leave" or "Stay Here" if it is "Stay Here" then exit mouseUp set cursor to 4 set lockscreen to true go to last card of background "Donor Reports" put the number of this card into LastCard go to first card of background "Donor Reports" put the number of this card into FirstCard put LastCard-FirstCard into TotalCards put empty into background field "Name" put empty into background field "Date" put empty into background field "Amount" if TotalCards is 0 then go to card "Map" exit mouseUp end if repeat with i = 1 to TotalCards doMenu "Delete Card" end repeat put empty into background field "Name" put empty into background field "Date" put empty into background field "Amount" go to card "Map" end mouseUp -- part 12 (button) -- low flags: 00 -- high flags: A000 -- rect: left=171 top=287 right=338 bottom=259 -- title width / last selected line: 0 -- icon id / first selected line: 12195 / 12195 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Write to Text File ----- HyperTalk script ----- on mouseUp ask "Before saving, name the file you want to save this data to?" with "(Ckg/Savings) Income REPORT" put it into ThisFile if ThisFile is empty then put "(Ckg/Savings) Income REPORT" into ThisFile open File ThisFile write "Be sure to set your tabs because the date and the amount "& "are separated by a tab setting!" & Return & Return to file ThisFile set cursor to 4 set lockscreen to true go to last card of background "Donor Reports" put the number of this card into LastCard go to first card of background "Donor Reports" put the number of this card into FirstCard put LastCard-FirstCard+1 into TotalCards repeat with j = 1 to TotalCards write background field "Name" to file ThisFile put the number of lines of background field "Amount" into TotalLines repeat with i = 1 to TotalLines put line i of background field "Date" into Date put line i of background field "Amount" into Amount write Date & Tab & Amount & Return to file ThisFile end repeat go to next card of this background end repeat Close File ThisFile --open file ThisFile --repeat with i = 1 to 5000 --read from file ThisFile until return --if it is empty then exit repeat --put it into line i of background field "The Text" --end repeat --Close File ThisFile end mouseUp -- part 13 (button) -- low flags: 00 -- high flags: A000 -- rect: left=366 top=290 right=338 bottom=411 -- title width / last selected line: 0 -- icon id / first selected line: 9301 / 9301 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Card 1 ----- HyperTalk script ----- on mouseUp visual effect scroll right go to next card of this background end mouseUp -- part 14 (button) -- low flags: 00 -- high flags: A000 -- rect: left=410 top=290 right=338 bottom=454 -- title width / last selected line: 0 -- icon id / first selected line: 27009 / 27009 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: of 2 ----- HyperTalk script ----- on mouseUp visual effect scroll left go to previous card of this background end mouseUp